import request from '@/utils/request';

// 查询就诊单列表
export function listOrder (query) {
  return request ({
    url: '/tijianyuyue/order/list',
    method: 'get',
    params: query,
  });
}
// 查询我的就诊单列表
export function listOrderUser (query) {
  return request ({
    url: '/tijianyuyue/order/list/user',
    method: 'get',
    params: query,
  });
}

// 查询就诊单详细
export function getOrder (id) {
  return request ({
    url: '/tijianyuyue/order/' + id,
    method: 'get',
  });
}
// 完成就诊单
export function finishOrder (id) {
  return request ({
    url: '/tijianyuyue/order/finish/' + id,
    method: 'post',
  });
}

// 新增就诊单
export function addOrder (data) {
  return request ({
    url: '/tijianyuyue/order',
    method: 'post',
    data: data,
  });
}

// 修改就诊单
export function updateOrder (data) {
  return request ({
    url: '/tijianyuyue/order',
    method: 'put',
    data: data,
  });
}

// 删除就诊单
export function delOrder (id) {
  return request ({
    url: '/tijianyuyue/order/' + id,
    method: 'delete',
  });
}
